package com.beiding.hotcode;

public interface MyMethod <R>{
    R invokeCatch(Object... params) throws Throwable;

    default R invoke(Object... params) {
        try {
            return invokeCatch(params);
        } catch (Throwable e) {
            RuntimeException runtimeException = new RuntimeException(e.getMessage(), e.getCause());
            runtimeException.setStackTrace(e.getStackTrace());
            throw runtimeException;
        }
    }
}
